Integrand size = 37, antiderivative size = 182 \[ \int \sec (c+d x) (b \sec (c+d x))^n \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {(C (1+n)+A (2+n)) \operatorname {Hypergeometric2F1}\left (\frac {1}{2},-\frac {n}{2},\frac {2-n}{2},\cos ^2(c+d x)\right ) (b \sec (c+d x))^n \sin (c+d x)}{d n (2+n) \sqrt {\sin ^2(c+d x)}}+\frac {B \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {1}{2} (-1-n),\frac {1-n}{2},\cos ^2(c+d x)\right ) (b \sec (c+d x))^{1+n} \sin (c+d x)}{b d (1+n) \sqrt {\sin ^2(c+d x)}}+\frac {C (b \sec (c+d x))^{1+n} \tan (c+d x)}{b d (2+n)} \]
(C*(1+n)+A*(2+n))*hypergeom([1/2, -1/2*n],[1-1/2*n],cos(d*x+c)^2)*(b*sec(d *x+c))^n*sin(d*x+c)/d/n/(2+n)/(sin(d*x+c)^2)^(1/2)+B*hypergeom([1/2, -1/2- 1/2*n],[1/2-1/2*n],cos(d*x+c)^2)*(b*sec(d*x+c))^(1+n)*sin(d*x+c)/b/d/(1+n) /(sin(d*x+c)^2)^(1/2)+C*(b*sec(d*x+c))^(1+n)*tan(d*x+c)/b/d/(2+n)
Time = 1.02 (sec) , antiderivative size = 167, normalized size of antiderivative = 0.92 \[ \int \sec (c+d x) (b \sec (c+d x))^n \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {\csc (c+d x) (b \sec (c+d x))^n \left (A \left (6+5 n+n^2\right ) \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {1+n}{2},\frac {3+n}{2},\sec ^2(c+d x)\right )+(1+n) \left (B (3+n) \cos (c+d x) \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {2+n}{2},\frac {4+n}{2},\sec ^2(c+d x)\right )+C (2+n) \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {3+n}{2},\frac {5+n}{2},\sec ^2(c+d x)\right )\right ) \sec ^2(c+d x)\right ) \sqrt {-\tan ^2(c+d x)}}{d (1+n) (2+n) (3+n)} \]
(Csc[c + d*x]*(b*Sec[c + d*x])^n*(A*(6 + 5*n + n^2)*Hypergeometric2F1[1/2, (1 + n)/2, (3 + n)/2, Sec[c + d*x]^2] + (1 + n)*(B*(3 + n)*Cos[c + d*x]*H ypergeometric2F1[1/2, (2 + n)/2, (4 + n)/2, Sec[c + d*x]^2] + C*(2 + n)*Hy pergeometric2F1[1/2, (3 + n)/2, (5 + n)/2, Sec[c + d*x]^2])*Sec[c + d*x]^2 )*Sqrt[-Tan[c + d*x]^2])/(d*(1 + n)*(2 + n)*(3 + n))
Time = 0.83 (sec) , antiderivative size = 177, normalized size of antiderivative = 0.97, number of steps used = 12, number of rules used = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.324, Rules used = {2030, 3042, 4535, 3042, 4259, 3042, 3122, 4534, 3042, 4259, 3042, 3122}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \sec (c+d x) (b \sec (c+d x))^n \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx\) |
\(\Big \downarrow \) 2030 |
\(\displaystyle \frac {\int (b \sec (c+d x))^{n+1} \left (C \sec ^2(c+d x)+B \sec (c+d x)+A\right )dx}{b}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\int \left (b \csc \left (c+d x+\frac {\pi }{2}\right )\right )^{n+1} \left (C \csc \left (c+d x+\frac {\pi }{2}\right )^2+B \csc \left (c+d x+\frac {\pi }{2}\right )+A\right )dx}{b}\) |
\(\Big \downarrow \) 4535 |
\(\displaystyle \frac {\int (b \sec (c+d x))^{n+1} \left (C \sec ^2(c+d x)+A\right )dx+\frac {B \int (b \sec (c+d x))^{n+2}dx}{b}}{b}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\int \left (b \csc \left (c+d x+\frac {\pi }{2}\right )\right )^{n+1} \left (C \csc \left (c+d x+\frac {\pi }{2}\right )^2+A\right )dx+\frac {B \int \left (b \csc \left (c+d x+\frac {\pi }{2}\right )\right )^{n+2}dx}{b}}{b}\) |
\(\Big \downarrow \) 4259 |
\(\displaystyle \frac {\int \left (b \csc \left (c+d x+\frac {\pi }{2}\right )\right )^{n+1} \left (C \csc \left (c+d x+\frac {\pi }{2}\right )^2+A\right )dx+\frac {B \left (\frac {\cos (c+d x)}{b}\right )^n (b \sec (c+d x))^n \int \left (\frac {\cos (c+d x)}{b}\right )^{-n-2}dx}{b}}{b}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\int \left (b \csc \left (c+d x+\frac {\pi }{2}\right )\right )^{n+1} \left (C \csc \left (c+d x+\frac {\pi }{2}\right )^2+A\right )dx+\frac {B \left (\frac {\cos (c+d x)}{b}\right )^n (b \sec (c+d x))^n \int \left (\frac {\sin \left (c+d x+\frac {\pi }{2}\right )}{b}\right )^{-n-2}dx}{b}}{b}\) |
\(\Big \downarrow \) 3122 |
\(\displaystyle \frac {\int \left (b \csc \left (c+d x+\frac {\pi }{2}\right )\right )^{n+1} \left (C \csc \left (c+d x+\frac {\pi }{2}\right )^2+A\right )dx+\frac {B \sin (c+d x) (b \sec (c+d x))^{n+1} \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {1}{2} (-n-1),\frac {1-n}{2},\cos ^2(c+d x)\right )}{d (n+1) \sqrt {\sin ^2(c+d x)}}}{b}\) |
\(\Big \downarrow \) 4534 |
\(\displaystyle \frac {\left (A+\frac {C (n+1)}{n+2}\right ) \int (b \sec (c+d x))^{n+1}dx+\frac {B \sin (c+d x) (b \sec (c+d x))^{n+1} \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {1}{2} (-n-1),\frac {1-n}{2},\cos ^2(c+d x)\right )}{d (n+1) \sqrt {\sin ^2(c+d x)}}+\frac {C \tan (c+d x) (b \sec (c+d x))^{n+1}}{d (n+2)}}{b}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\left (A+\frac {C (n+1)}{n+2}\right ) \int \left (b \csc \left (c+d x+\frac {\pi }{2}\right )\right )^{n+1}dx+\frac {B \sin (c+d x) (b \sec (c+d x))^{n+1} \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {1}{2} (-n-1),\frac {1-n}{2},\cos ^2(c+d x)\right )}{d (n+1) \sqrt {\sin ^2(c+d x)}}+\frac {C \tan (c+d x) (b \sec (c+d x))^{n+1}}{d (n+2)}}{b}\) |
\(\Big \downarrow \) 4259 |
\(\displaystyle \frac {\left (A+\frac {C (n+1)}{n+2}\right ) \left (\frac {\cos (c+d x)}{b}\right )^n (b \sec (c+d x))^n \int \left (\frac {\cos (c+d x)}{b}\right )^{-n-1}dx+\frac {B \sin (c+d x) (b \sec (c+d x))^{n+1} \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {1}{2} (-n-1),\frac {1-n}{2},\cos ^2(c+d x)\right )}{d (n+1) \sqrt {\sin ^2(c+d x)}}+\frac {C \tan (c+d x) (b \sec (c+d x))^{n+1}}{d (n+2)}}{b}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\left (A+\frac {C (n+1)}{n+2}\right ) \left (\frac {\cos (c+d x)}{b}\right )^n (b \sec (c+d x))^n \int \left (\frac {\sin \left (c+d x+\frac {\pi }{2}\right )}{b}\right )^{-n-1}dx+\frac {B \sin (c+d x) (b \sec (c+d x))^{n+1} \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {1}{2} (-n-1),\frac {1-n}{2},\cos ^2(c+d x)\right )}{d (n+1) \sqrt {\sin ^2(c+d x)}}+\frac {C \tan (c+d x) (b \sec (c+d x))^{n+1}}{d (n+2)}}{b}\) |
\(\Big \downarrow \) 3122 |
\(\displaystyle \frac {\frac {b \left (A+\frac {C (n+1)}{n+2}\right ) \sin (c+d x) (b \sec (c+d x))^n \operatorname {Hypergeometric2F1}\left (\frac {1}{2},-\frac {n}{2},\frac {2-n}{2},\cos ^2(c+d x)\right )}{d n \sqrt {\sin ^2(c+d x)}}+\frac {B \sin (c+d x) (b \sec (c+d x))^{n+1} \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {1}{2} (-n-1),\frac {1-n}{2},\cos ^2(c+d x)\right )}{d (n+1) \sqrt {\sin ^2(c+d x)}}+\frac {C \tan (c+d x) (b \sec (c+d x))^{n+1}}{d (n+2)}}{b}\) |
((b*(A + (C*(1 + n))/(2 + n))*Hypergeometric2F1[1/2, -1/2*n, (2 - n)/2, Co s[c + d*x]^2]*(b*Sec[c + d*x])^n*Sin[c + d*x])/(d*n*Sqrt[Sin[c + d*x]^2]) + (B*Hypergeometric2F1[1/2, (-1 - n)/2, (1 - n)/2, Cos[c + d*x]^2]*(b*Sec[ c + d*x])^(1 + n)*Sin[c + d*x])/(d*(1 + n)*Sqrt[Sin[c + d*x]^2]) + (C*(b*S ec[c + d*x])^(1 + n)*Tan[c + d*x])/(d*(2 + n)))/b
3.1.73.3.1 Defintions of rubi rules used
Int[(Fx_.)*(v_)^(m_.)*((b_)*(v_))^(n_), x_Symbol] :> Simp[1/b^m Int[(b*v) ^(m + n)*Fx, x], x] /; FreeQ[{b, n}, x] && IntegerQ[m]
Int[((b_.)*sin[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[Cos[c + d*x]*(( b*Sin[c + d*x])^(n + 1)/(b*d*(n + 1)*Sqrt[Cos[c + d*x]^2]))*Hypergeometric2 F1[1/2, (n + 1)/2, (n + 3)/2, Sin[c + d*x]^2], x] /; FreeQ[{b, c, d, n}, x] && !IntegerQ[2*n]
Int[(csc[(c_.) + (d_.)*(x_)]*(b_.))^(n_), x_Symbol] :> Simp[(b*Csc[c + d*x] )^(n - 1)*((Sin[c + d*x]/b)^(n - 1) Int[1/(Sin[c + d*x]/b)^n, x]), x] /; FreeQ[{b, c, d, n}, x] && !IntegerQ[n]
Int[(csc[(e_.) + (f_.)*(x_)]*(b_.))^(m_.)*(csc[(e_.) + (f_.)*(x_)]^2*(C_.) + (A_)), x_Symbol] :> Simp[(-C)*Cot[e + f*x]*((b*Csc[e + f*x])^m/(f*(m + 1) )), x] + Simp[(C*m + A*(m + 1))/(m + 1) Int[(b*Csc[e + f*x])^m, x], x] /; FreeQ[{b, e, f, A, C, m}, x] && NeQ[C*m + A*(m + 1), 0] && !LeQ[m, -1]
Int[(csc[(e_.) + (f_.)*(x_)]*(b_.))^(m_.)*((A_.) + csc[(e_.) + (f_.)*(x_)]* (B_.) + csc[(e_.) + (f_.)*(x_)]^2*(C_.)), x_Symbol] :> Simp[B/b Int[(b*Cs c[e + f*x])^(m + 1), x], x] + Int[(b*Csc[e + f*x])^m*(A + C*Csc[e + f*x]^2) , x] /; FreeQ[{b, e, f, A, B, C, m}, x]
\[\int \sec \left (d x +c \right ) \left (b \sec \left (d x +c \right )\right )^{n} \left (A +B \sec \left (d x +c \right )+C \sec \left (d x +c \right )^{2}\right )d x\]
\[ \int \sec (c+d x) (b \sec (c+d x))^n \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\int { {\left (C \sec \left (d x + c\right )^{2} + B \sec \left (d x + c\right ) + A\right )} \left (b \sec \left (d x + c\right )\right )^{n} \sec \left (d x + c\right ) \,d x } \]
\[ \int \sec (c+d x) (b \sec (c+d x))^n \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\int \left (b \sec {\left (c + d x \right )}\right )^{n} \left (A + B \sec {\left (c + d x \right )} + C \sec ^{2}{\left (c + d x \right )}\right ) \sec {\left (c + d x \right )}\, dx \]
\[ \int \sec (c+d x) (b \sec (c+d x))^n \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\int { {\left (C \sec \left (d x + c\right )^{2} + B \sec \left (d x + c\right ) + A\right )} \left (b \sec \left (d x + c\right )\right )^{n} \sec \left (d x + c\right ) \,d x } \]
\[ \int \sec (c+d x) (b \sec (c+d x))^n \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\int { {\left (C \sec \left (d x + c\right )^{2} + B \sec \left (d x + c\right ) + A\right )} \left (b \sec \left (d x + c\right )\right )^{n} \sec \left (d x + c\right ) \,d x } \]
Timed out. \[ \int \sec (c+d x) (b \sec (c+d x))^n \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\int \frac {{\left (\frac {b}{\cos \left (c+d\,x\right )}\right )}^n\,\left (A+\frac {B}{\cos \left (c+d\,x\right )}+\frac {C}{{\cos \left (c+d\,x\right )}^2}\right )}{\cos \left (c+d\,x\right )} \,d x \]